﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Egeye.AddIn
{
    /// <summary>
    /// An installed bundle in the Framework.
    /// </summary>
    public interface IBundle
    {
        BundleState State { get; }

        void Start();

        void Stop();

        void Update();

        void Update(Stream inputStream);

        void Uninstall();

        Dictionary<string, object> GetProperties();

        IBundleContext Context { get; }

        Int32 Id { get; }

        string Location { get; }

        string SymbolicName { get; }

        IServiceReference[] GetRegisteredServices();

        IServiceReference[] GetServicesInUse();

        //bool HasPermission(object permission);

        Uri GetResource(string name);

        Dictionary<string, object> GetProperties(string locale);

        Type LoadClass(string name);

        IEnumerator GetResources(string name);

        IEnumerator GetEntryPaths(string name);

        IEnumerator GetEntry(string name);

        long GetLastModified();

        IEnumerator FindEntries(string path, string filePattern,
			bool recurse);
    }
}
